/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-08-14
 * Time: 14:15
 */
public class Test {
    public static void main(String[] args) {
        MyLinkedList list = new MyLinkedList();
        list.lastAdd(1);
        list.lastAdd(1);
        list.lastAdd(1);
        list.lastAdd(2);
        list.lastAdd(1);
        list.lastAdd(3);
        list.lastAdd(4);
        list.display();
        list.deleteAll(1);
        list.display();
        //list.reverse2();
//        list.revers(list.getHead(1));
    }
    public static void main1(String[] args) {
        MyLinkedList list = new MyLinkedList();
        list.lastAdd(1);
        list.lastAdd(2);
        list.lastAdd(3);
        list.lastAdd(3);
        list.lastAdd(3);
        list.lastAdd(3);
        list.display();
        System.out.println("=========尾插法===");
//        list.firstAdd(1);
//        list.firstAdd(2);
//        list.firstAdd(3);
//        list.display();
        int num = list.size();
        System.out.println(num);
        System.out.println("========");
        list.indexAdd(0,0);
        list.indexAdd(4,4);
        list.display();
        System.out.println("==========" );
        System.out.println(list.findHave(3));
        System.out.println(list.findHave(5));
        System.out.println("==============");
        list.update(0,100);
        list.update(1,101);
        list.update(4,104);
        list.display();
        System.out.println("=========");
        //list.delete(100);
        list.delete(2);
        list.delete(104);
        list.display();
        System.out.println("=========");
        list.deleteAll(3);
        list.display();
        System.out.println("==========");
        list.cleanEveryNUll();
        list.display();

    }
}
